An image pick-up apparatus such as a camera has conventionally employed a technique for detecting a prescribed image pick-up target from a picked-up image of a subject (picked-up image). For example, in an augmented reality technique, a technique for detecting a marker by subjecting a marker (a search target) included in an image picked up by a camera to image recognition processing (a marker detection technique) has been known.
An exemplary embodiment provides an information processing program, an information processing system, an information processing apparatus, and an information processing method, capable of causing an event as intended by a user to occur by making use of a detected marker (a search target).
An exemplary embodiment provides a non-transitory storage medium encoded with a computer readable information processing program and executable by a computer of an information processing apparatus. The information processing apparatus is connected to an image pick-up apparatus and a display. The information processing program includes image obtaining instructions, search target detection instructions, distance calculation instructions, event occurrence instructions, virtual image generation instructions, and display control instructions. The image obtaining instructions cause the computer to obtain an image of a subject picked up by the image pick-up apparatus. The search target detection instructions cause the computer to detect a search target from the image of the subject obtained in accordance with the image obtaining instructions. The distance calculation instructions cause the computer to calculate a distance between the image pick-up apparatus and the search target based on the image of the subject. The event occurrence instructions cause the computer to cause an event to occur in a virtual space in accordance with the distance between the image pick-up apparatus and the search target calculated in accordance with the distance calculation instructions. The virtual image generation instructions cause the computer to generate a virtual image by shooting the event that occurs in accordance with the event occurrence instructions with a virtual camera arranged in the virtual space. The display control instructions cause the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event can be caused to occur in the virtual space in accordance with the calculated distance between the image pick-up apparatus and the search target, an event as intended by the user can be caused to occur by utilizing the detected search target.
In an exemplary embodiment, the event occurrence instructions are adapted to cause the event to occur when the distance between the image pick-up apparatus and the search target calculated in accordance with the distance calculation instructions is equal to or smaller than a prescribed distance.
According to the exemplary embodiment, as the user brings the image pick-up apparatus closer to the search target to set the calculated distance between the image pick-up apparatus and the search target to a distance equal to or smaller than the prescribed distance, an event as intended by the user can be caused to occur.
In an exemplary embodiment, the search target includes a first search target and a second search target arranged as encompassed in the first search target, and the event occurrence instructions are adapted to cause a first event to occur when a distance between the image pick-up apparatus and the first search target is equal to or smaller than a first distance and to cause a second event to occur when a distance between the image pick-up apparatus and the second search target is equal to or smaller than a second distance.
According to the exemplary embodiment, an event as intended by the user can be caused to occur based on the distance between the image pick-up apparatus and the first search target and the distance between the image pick-up apparatus and the second search target.
In an exemplary embodiment, the search target includes a first search target and a plurality of second search targets arranged as encompassed in the first search target, and the event occurrence instructions are adapted to cause the event to occur in accordance with a second search target, among the plurality of second search targets, of which distance from the image pick-up apparatus is equal to or smaller than a prescribed distance.
According to the exemplary embodiment, a specific second search target can be selected from the plurality of second search targets based on the distance between the image pick-up apparatus and the second search target, and an event as intended by the user can be caused to occur.
In an exemplary embodiment, the event occurrence instructions are adapted to cause a first event to occur when a distance between the image pick-up apparatus and the first search target is equal to or smaller than a first distance and to cause a second event to occur when the distance of a second search target, among a plurality of the second search targets, from the image pick-up apparatus is equal to or smaller than the prescribed distance.
According to the exemplary embodiment, an event as intended by the user can be caused to occur based on the distance between the image pick-up apparatus and the first search target and the distance between the image pick-up apparatus and the second search target.
In an exemplary embodiment, the event occurrence instructions are adapted to cause a first event to occur when the first search target is detected and to cause a second event to occur when the distance of a second search target, among the plurality of the second search targets, from the image pick-up apparatus is subsequently equal to or smaller than the prescribed distance.
According to the exemplary embodiment, a first event is caused to occur when the first search target is detected, and a second event is caused to occur by subsequently bringing the image pick-up apparatus closer to the second search target. Therefore, the first event and the second event can be caused to occur as intended by the user.
In an exemplary embodiment, the event that occurred in accordance with the event occurrence instructions includes arrangement of an object in a prescribed shape in the virtual space, and the virtual image generation instructions are adapted to generate the virtual image by shooting the object in the prescribed shape with the virtual camera.
According to the exemplary embodiment, since an object in a prescribed shape is displayed in accordance with an event, as compared with a case where an object is simply displayed at a position corresponding to the search target, more visual effects for having the user actually feel augmented reality can be provided.
In an exemplary embodiment, the event that occurred in accordance with the event occurrence instructions includes arrangement of a plate-shaped polygon in the virtual space, and the virtual image generation instructions are adapted to generate the virtual image by mapping a texture on the plate-shaped polygon and shooting the polygon with the virtual camera.
According to the exemplary embodiment, since a virtual image obtained by mapping a texture on the plate-shaped polygon arranged in the virtual space is generated, more visual effects for having the user actually feel augmented reality can be provided.
In an exemplary embodiment, the information processing program further includes position calculation instructions for calculating positional relation between the image pick-up apparatus and the search target based on the image of the subject and virtual camera arrangement instructions for arranging the virtual camera in accordance with the positional relation calculated in accordance with the position calculation instructions.
According to the exemplary embodiment, since an image picked up by a virtual camera arranged in accordance with positional relation between the image pick-up apparatus and the search target is generated as the virtual image, such display as if an event occurred in a real world can be provided and hence more visual effects for having the user actually feel augmented reality can be provided.
An exemplary embodiment provides an information processing apparatus connected to an image pick-up apparatus and a display. The information processing apparatus includes an image obtaining unit, a search target detection unit, a distance calculation unit, an event occurrence unit, a virtual image generation unit, and a display control unit. The image obtaining unit obtains an image of a subject picked up by the image pick-up apparatus. The search target detection unit detects a search target from the image of the subject obtained by the image obtaining unit. The distance calculation unit calculates a distance between the image pick-up apparatus and the search target based on the image of the subject. The event occurrence unit causes an event to occur in a virtual space in accordance with the distance between the image pick-up apparatus and the search target calculated by the distance calculation unit. The virtual image generation unit generates a virtual image by shooting the event that occurs by means of the event occurrence unit with a virtual camera arranged in the virtual space. The display control unit causes the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event can be caused to occur in the virtual space in accordance with the calculated distance between the image pick-up apparatus and the search target, an event as intended by a user can be caused to occur by utilizing the detected search target.
An exemplary embodiment provides an information processing method processed by a control unit of an information processing apparatus connected to an image pick-up apparatus and a display. The information processing method includes the steps of obtaining an image of a subject picked up by the image pick-up apparatus, detecting a search target from the obtained image of the subject, calculating a distance between the image pick-up apparatus and the search target based on the image of the subject, causing an event to occur in a virtual space in accordance with the calculated distance between the image pick-up apparatus and the search target, generating a virtual image by shooting the event that occurs with a virtual camera arranged in the virtual space, and causing the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event can be caused to occur in the virtual space in accordance with the calculated distance between the image pick-up apparatus and the search target, an event as intended by a user can be caused to occur by utilizing the detected search target.
An exemplary embodiment provides an information processing system. The information processing system includes a search target arranged in a subject, an image pick-up apparatus for picking up an image of the subject, an information processing apparatus connected to the image pick-up apparatus, and a display connected to the information processing apparatus. The information processing apparatus includes an image obtaining unit for obtaining the image of the subject picked up by the image pick-up apparatus, a search target detection unit for detecting the search target from the image of the subject obtained by the image obtaining unit, a distance calculation unit for calculating a distance between the image pick-up apparatus and the search target based on the image of the subject, an event occurrence unit for causing an event to occur in a virtual space in accordance with the distance between the image pick-up apparatus and the search target calculated by the distance calculation unit, a virtual image generation unit for generating a virtual image by shooting the event that occurs by means of the event occurrence unit with a virtual camera arranged in the virtual space, and a display control unit for causing the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event can be caused to occur in the virtual space in accordance with the calculated distance between the image pick-up apparatus and the search target, an event as intended by a user can be caused to occur by utilizing the detected search target.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.